﻿@model GameSchool.Models.Person

@{
    ViewBag.Title = "Breyta notanda";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Breyta skráningu notanda</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Notandi</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Username)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Fullname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Fullname)
            @Html.ValidationMessageFor(model => model.Fullname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Address)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Address)
            @Html.ValidationMessageFor(model => model.Address)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ZipCode)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ZipCode)
            @Html.ValidationMessageFor(model => model.ZipCode)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Ssn)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Ssn)
            @Html.ValidationMessageFor(model => model.Ssn)
        </div>
		
        <div class="editor-label">
            @Html.LabelFor(model => model.IsStudent)
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.IsStudent)
	    </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsTeacher)
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.IsTeacher)
	    </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsAdmin)
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.IsAdmin)
	    </div>



     @*   <div class="editor-label">
            @Html.LabelFor(model => GameSchool.Extra.UserInfo.PersonId)
		        <div class="editor-field">
				    @Html.CheckBoxFor(model => GameSchool.Extra.UserInfo.PersonExtra.IsAdmin)
			    </div>

                <div class="display-label">Kennari</div>
		        <div class="editor-field">
				    @Html.CheckBoxFor(model => GameSchool.Extra.UserInfo.PersonExtra.IsTeacher)
			    </div>

                <div class="display-label">Nemandi</div>
		        <div class="editor-field">
				    @Html.CheckBoxFor(model => GameSchool.Extra.UserInfo.PersonExtra.IsStudent)
			    </div> 
<div class="display-label">Kennari</div>
        <div class="editor-field">
            @Html.EditorFor(model => GameSchool.Extra.UserInfo.IsAdmin)
            @Html.ValidationMessageFor(model => GameSchool.Extra.UserInfo.IsAdmin)
        </div>

<div class="display-label">Kennari</div>
        <div class="editor-field">
            @Html.EditorFor(model => GameSchool.Extra.UserInfo.IsTeacher)
            @Html.ValidationMessageFor(model => GameSchool.Extra.UserInfo.IsTeacher)
        </div>

<div class="display-label">Kennari</div>
        <div class="editor-field">
            @Html.EditorFor(model => GameSchool.Extra.UserInfo.IsStudent)
            @Html.ValidationMessageFor(model => GameSchool.Extra.UserInfo.IsStudent)
        </div>   *@
		<br/>
		<p>
            <input type="submit" value="Vista breytingar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Allir notendur", "Index", "Person")
</div>
